<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateItemOrderAppealsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('item_order_appeals', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('order_id')->default(0)->comment('订单id');
            $table->integer('user_id')->default(0)->comment('申诉用户id');
            $table->string('content')->default('')->comment('申诉理由');
            $table->integer('publisher_uid')->default(0)->comment('发布者id');
            $table->tinyInteger('status')->default(1)->comment('状态:1待审核，2审核通过，3审核失败，4已退款，5待用户确认，6用户确认未解决，7用户确认已解决（完成）');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('item_order_appeals');
    }
}
